﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="MemberHaveForm.aspx.cs" Inherits="App_Input_MemberHaveForm" Title="详细信息"
    EnableEventValidation="false" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>

        <script>

    function popupMemberSearch(memberNo)
{
  var MemberNo1=memberNo
window.open('../Input/HealthMemberHealthForm.aspx?MEMBER_NO='+MemberNo1,'HealthMemberHealthForm','height=530,width=700,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');
}
    function buildChange(object)
    {
     CommonAjaxUtils.FindFloor(object.value,get_floor_Result_CallBack);
     CommonAjaxUtils.FindRoom(object.value,"",get_room_Result_CallBack);

    }
    
    function floorChange(object)
    {
         var objBuildNo= window.document.getElementById('<%=dropBuildNo.ClientID %>')
         CommonAjaxUtils.FindRoom(objBuildNo.value,object.value,get_room_Result_CallBack);
    }
    function get_floor_Result_CallBack(response)
            {
                if (response.value != null)
                {                    
 
                    var drop = window.document.getElementById('<%=dropFloor.ClientID %>');
                    drop.length=0;　　　　            
　　　　            var ds = response.value;
                    if(ds != null && typeof(ds) == "object")
                    {                   
　　　　　　                drop.options.add(new Option("",""));
                        for(var i=0; i<ds.length; i++)
　　　　                {
　　　　       
　　　　　　                var name=ds[i].Floor;
　　　　　　                var id=ds[i].Floor;
　　　　　　                drop.options.add(new Option(name,id));
　　　　                }                
                    }
                }
                return
            }
            
            function get_room_Result_CallBack(response)
            {
                if (response.value != null)
                {                    
 
                    var drop = window.document.getElementById('<%=dropRoom.ClientID %>');
                    drop.length=0;　　　　            
　　　　            var ds = response.value;
                    if(ds != null && typeof(ds) == "object")
                    {                   
　　　　　　                drop.options.add(new Option("",""));
                        for(var i=0; i<ds.length; i++)
　　　　                {
　　　　       
　　　　　　                var name=ds[i].ApartmentNo;
　　　　　　                var id=ds[i].ApartmentNo;
　　　　　　                drop.options.add(new Option(name,id));
　　　　                }                
                    }
                }
                return
            }

        </script>

        <cc1:ComValidator ID="ComValidator1" runat="server">
            <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtMemberNo">
                <cc1:ComAbsParamsAttribute Parameter="会员编号" />
            </cc1:CheckHalfAttribute>
        </cc1:ComValidator>
        <br />
        <table class="table_border_line" style="background: ffffff">
            <tr>
                <td align="left" colspan="4">

                    <script language="javascript">
                            (new TitleBar('PerformBar1', '检索条件')).showBar();
                    </script>

                </td>
            </tr>
            <tr>
                <td style="width: 90px">
                    &nbsp;会员编号：</td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:TextBox ID="txtMemberNo" runat="server" MaxLength="16"></asp:TextBox></td>
                <td align="left" nowrap="nowrap" width="52%">
                    &nbsp;</td>
                <td align="right">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 90px">
                    &nbsp;会员姓名：</td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:TextBox ID="txtMemberName" runat="server" MaxLength="100"></asp:TextBox></td>
                <td align="left" nowrap="nowrap" width="52%">
                    &nbsp;</td>
                <td align="right">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 90px">
                    &nbsp;楼号：</td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:DropDownList ID="dropBuildNo" runat="server" CausesValidation="True" DataTextField="BuildingNo"
                        DataValueField="BuildingNo" onchange="buildChange(this)" Width="76px">
                    </asp:DropDownList></td>
                <td align="left" nowrap="nowrap" width="52%">
                </td>
                <td align="right">
                </td>
            </tr>
            <tr>
                <td style="width: 90px">
                    &nbsp;楼层：</td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:DropDownList ID="dropFloor" runat="server" DataTextField="Floor" DataValueField="Floor"
                        onchange="floorChange(this)" Width="76px">
                    </asp:DropDownList></td>
                <td align="left" nowrap="nowrap" width="52%">
                </td>
                <td align="right">
                </td>
            </tr>
            <tr>
                <td style="width: 90px">
                    &nbsp;房间号：</td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:DropDownList ID="dropRoom" runat="server" DataTextField="ApartmentNo" DataValueField="ApartmentNo"
                        Width="76px">
                    </asp:DropDownList></td>
                <td align="left" nowrap="nowrap" width="52%">
                </td>
                <td align="right">
                </td>
            </tr>
            <tr style="height: 5px">
                <td style="width: 90px">
                    &nbsp;</td>
                <td align="center" nowrap="nowrap" style="width: 120px">
                </td>
                <td align="left" nowrap="nowrap" width="52%">
                </td>
                <td align="right">
                </td>
            </tr>
            <tr>
                <td style="width: 90px">
                </td>
                <td align="left" nowrap="nowrap" style="width: 120px">
                    <asp:Button ID="btnSearch" runat="server" Text="检 索" CssClass="button" Width="80px"
                        OnClick="btnSearch_Click" /></td>
                <td align="left" nowrap="nowrap" width="52%">
                    &nbsp;</td>
                <td align="right">
                    &nbsp;</td>
            </tr>
        </table>
    </div>
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        CssClass="GridView_table" Width="100%" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" DataKeyNames="MemberNo" PageSize="20">
        <Columns>
            <asp:TemplateField HeaderText="会员编号">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MemberNo") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemStyle CssClass="GridView_item_left" />
                <HeaderStyle CssClass="GridView_head_grayblue" />
                <ItemTemplate>
                    <asp:HyperLink ID="hypeMemberNo" runat="server" href="#" Text='<%# Bind("MemberNo") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="会员姓名" DataField="Name">
                <ItemStyle CssClass="GridView_item_center" />
                <HeaderStyle CssClass="GridView_head_grayblue" />
            </asp:BoundField>
            <asp:BoundField HeaderText="房间编号" DataField="ApartmentNo">
                <ItemStyle CssClass="GridView_item_center" />
                <HeaderStyle CssClass="GridView_head_grayblue" />
            </asp:BoundField>
                                                    
            <asp:CommandField HeaderText="生活模型" SelectText="生活模型" ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/images/info.gif">
                <HeaderStyle CssClass="GridView_head_grayblue" />
                <ItemStyle CssClass="GridView_item_center" />
            </asp:CommandField>
           <asp:TemplateField HeaderText="会员健康情况">
              <ItemTemplate>
                  <asp:HyperLink ID="health" ImageUrl="~/images/in.gif" runat="server" NavigateUrl=""
                      href="#"> </asp:HyperLink>
              </ItemTemplate>
              <ItemStyle CssClass="GridView_item_center" />
              <HeaderStyle CssClass="GridView_head_grayblue" />
          </asp:TemplateField>
            
        </Columns>
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
    </asp:GridView>
</asp:Content>
